package com.shyb.lingxian;

import android.app.Application;
import android.content.Context;
import android.os.Handler;

/**
 * Created by gs on 2018/3/23.
 */

public class MainApplication extends Application {
    public static MainApplication app;
    public static Handler mhandler;
    public static Context context;


    @Override
    public void onCreate() {
        super.onCreate();
        mhandler = new Handler();
        context=this;

    }

    public static Handler getMainHandler(){
        return mhandler;
    }
    public static Context getContext(){
        return context;
    }

    public MainApplication() {
        app = this;
    }

    public static MainApplication getIntance() {
        if (null == app) {
            app = new MainApplication();
        }
        return app;
    }
}
